<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateShipperInformationTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('shipper_information', function (Blueprint $table) {
            $table->increments('id');
            $table->unsignedInteger('uid')->nullable()->index()->comment('用户id');
            $table->string('send_name')->comment('寄件人姓名');
            $table->string('send_phone')->index()->comment('寄件人手机号');
            $table->unsignedInteger('send_province')->nullable()->comment('寄件人省');
            $table->unsignedInteger('send_city')->nullable()->comment('寄件人市');
            $table->unsignedInteger('send_county')->nullable()->comment('寄件人区县');
            $table->string('send_address')->comment('寄件详细地址');
            $table->string('to_name')->comment('收件人姓名');
            $table->string('to_phone')->index()->comment('收件人手机号');
            $table->unsignedInteger('to_province')->nullable()->comment('收件人省');
            $table->unsignedInteger('to_city')->nullable()->comment('收件人市');
            $table->unsignedInteger('to_county')->nullable()->comment('收件人区县');
            $table->string('to_address')->comment('收件详细地址');
            $table->string('remarks')->comment('备注');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('shipper_information');
    }
}
